package com.kamistoat.meimeistore.ware.learn;

import org.springframework.context.ApplicationContextInitializer;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

/**
 * 自定义ApplicationContextInitializer，在学习Springboot源码时创建的。与业务逻辑无关
 */
@Order(123)
public class LearnApplicationContextInitializer implements ApplicationContextInitializer {
    @Override
    public void initialize(ConfigurableApplicationContext configurableApplicationContext) {
        System.out.println("当前容器中初始化Bean的数量：" + configurableApplicationContext.getBeanDefinitionCount());
    }
}
